/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/* vim:set et ts=4: */
/* IBust - IBus with Traditional interface
 * Copyright(c) 2013 Daniel Sun
 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
 * Copyright (C) 2008-2010 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */
#ifndef __IBUST_IM_CONTEXT_H_
#define __IBUST_IM_CONTEXT_H_

#include <gtk/gtk.h>

/*
 * Type macros.
 */
#define IBUST_TYPE_IM_CONTEXT             \
    (ibust_im_context_get_type ())
#define IBUST_IM_CONTEXT(obj)             \
    (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUST_TYPE_IM_CONTEXT, IBustIMContext))
#define IBUST_IM_CONTEXT_CLASS(klass)     \
    (G_TYPE_CHECK_CLASS_CAST ((klass), IBUST_TYPE_IM_CONTEXT, IBustIMContextClass))
#define IBUST_IS_IM_CONTEXT(obj)          \
    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUST_TYPE_IM_CONTEXT))
#define IBUST_IS_IM_CONTEXT_CLASS(klass)  \
    (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUST_TYPE_IM_CONTEXT))
#define IBUST_IM_CONTEXT_GET_CLASS(obj)   \
    (G_TYPE_CHECK_GET_CLASS ((obj), IBUST_TYPE_IM_CONTEXT, IBustIMContextClass))

G_BEGIN_DECLS
typedef struct _IBustIMContext IBustIMContext;
typedef struct _IBustIMContextClass IBustIMContextClass;
typedef struct _IBustIMContextPrivate IBustIMContextPrivate;


GType    ibust_im_context_get_type (void);
IBustIMContext
        *ibust_im_context_new      (void);
void     ibust_im_context_register_type
                                  (GTypeModule    *type_module);
void     ibust_im_context_shutdown
                                  (void);
const gchar
        *ibust_im_context_get_ic   (IBustIMContext  *context);
void     ibust_im_context_set_ic   (IBustIMContext  *context,
                                   const gchar    *ic);
void     ibust_im_context_enable   (IBustIMContext  *context);
void     ibust_im_context_disable  (IBustIMContext  *context);
void     ibust_im_context_commit_string
                                  (IBustIMContext  *context,
                                   const gchar    *string);
void     ibust_im_context_update_preedit
                                  (IBustIMContext  *context,
                                   const gchar    *string,
                                   PangoAttrList  *attrs,
                                   gint            cursor_pos,
                                   gboolean        visible);
void     ibust_im_context_show_preedit
                                  (IBustIMContext *context);
void     ibust_im_context_hide_preedit
                                  (IBustIMContext *context);
G_END_DECLS
#endif

